package com.pzh.logistics.exception;

import lombok.Getter;

@Getter
public class GlobalException extends RuntimeException{
    private Integer code;

    public GlobalException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }


    public GlobalException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
